Improvements to HTTP/S-RPC server (RIPD-489, RIPD-533)

A large rewrite
http://stackoverflow.com/questions/2390230/do-copyright-dates-need-to-be-updated