Use @synchronize() for accessing the in-memory cache
Fix compilation on OS X
Correctly encode string values in query parameters
Update project file
Retain and release the image from the cache

Avoids a race condition with the garbage collector thread
Better locking