How often should I call getblocktemplate?
One fundamental, expected way to make a valid template invalid: someone else finds a block, and it's time to switch.

You can technically keep incrementing "curtime" until it's 2 hours in the future, though my gut tells me I should try to avoid pushing "curtime" anywhere near that far into the future until after I've exhausted everything else.  I haven't spent too much time looking into GBT, but you should be able to make at least some changes to the coinbase data on the generation transaction (you probably won't have complete freedom, as I'm guessing there's a way for the pool to force things like /P2SH/ to show up in there for example) to get a different Merkle root.  People often call this the "extranonce".

As for when you should ask for a new template, immediately after the spot you quoted in the bitcoin wiki, it says this:


  If your template included a "longpollid" key, you can queue a request for a new template to be executed as soon as the pool decides you should change. This is the same as any other template request, except that you include the "longpollid" parameter that the pool provided in your request. If there is already a new template, the pool might respond immediately, so be sure not to depend on a delay!


In other words, you should be able to do a "long poll" request that won't return any data until the pool server decides for you that it's time for a new template.  You definitely shouldn't rely on guessing that "desired block interval" ought to be good enough.