remove html output from rest
Close context at end of REST request to community

- Following advice from Richard Rodgers at OR14
DS-1986 Get new context each time, close in finally, for all REST methods
Merge pull request #561 from peterdietz/rest-context

DS-1986 REST to use new context for each request