Extend API Capabilitys

Creating this just to provide a place to centralise talk/discussion on this issue.

I've mostly got all the basics working, the one exception being a method of removing all "output" caches whenever a save takes place (needed if we want to cache the final outputs) which would be pretty useful.

Other todos:
[ ] Agree error code / error page (swicted to 501 for better browser behavior)
[ ] Add ability to switch output from json/xml ? This isn't really required but XML can be more readable when debugging.
[ ] Cache programme/subject relations & add to output
[ ] Re-add SDS data to outputs (Depending on how that ends up working), I've removed the dummy code for now.
[ ] Integrate matts changes for the index (adding some extra data)
[ ] Add any additional API outputs.

I'm probably done with this for today so if anyone else wants to have a poke/play feel free.