Add support to clear memory caches for a specific or all applications

Right now it doesn't make any difference if we clear the caches for a specific application
or all as QtWebKit only has one context per process right now. But we implement this to be
free of any web engine implementation detail and are ready for the time when our web
engine will have multiple contexts.

Signed-off-by: Simon Busch <morphis@gravedo.de>