Extend API Capabilities

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:

- [x] Agree error code / error page (swicted to 501 for better browser behavior)
- [x] Add ability to switch output from json/xml ? This isn't really required but XML can be more readable when debugging.
- [x] Cache programme/subject relations & add to output
- [x] Re-add SDS data to outputs (Depending on how that ends up working), I've removed the dummy code for now.
- [x] Integrate matts changes for the index (adding some extra data)
- [x] 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.