fix preg_replace preg_split with utf-8
Improving CONTENT_TYPE mime detection fix for PHP 5.4 webserver
Fixes Restler to correctly get the authentication class instance for WWW-Authenticate header. Fixes #299
Necessities for Google App Engine

As GAE filesystem is not writable, then an exception is always thrown
because of the cache folder. But if you already have a cache file before
uploading then not being able to write it is not a problem anymore. So
it is enough to check for write permission in the
HumanReadableCache::set() method.

In the Restler::getPath() method, GAE gave me a notice because $_SERVER
doesn't have an index 'SERVER_PORT'. It is fixed now.
Fixed detecting server port
Performance improvement by using strtok instead of regex
Adjusted the spacing
Lets use remove common path instead of string replace to be precise
Better baseUrl formation
Refactored the produced and consumed mime types to writable and readable respectively
Updated resources to use the renamed methods
Lets make sure the writable and readable mime types are reset before adding to them
Lets only consider the extensions of response formats
Lets only consider the extensions of response formats for the overriding formats too