Restfulservice improvements

I've been doing quite a bit of RESTful API integrations at the moment and found that the core service class didn't quite meet the requirements, a significant one being that it wasn't possible to read the response headers.

Each feature set has been committed with appropriate comments and I've put extensive phpdoc in there too.