Made the request cache opt-in for methods that call into the server

Added an extra $cache parameter that defaults to 'false', which, if
enabled caches the method call and allows the client to call all
cached methods in batch at the beginning of next request.

Currently, only Database::get and File::get methods are allowed
to be cached, with others to follow.