Move getDatabaseDirectory and getCacheDirectory to a new class

The reason for this is that the CookieSyncManager might not be
initialized right after a webview is created since the initialization
is done with a message.

If someone creates a webview and tries to access a cookie right
afterwards that would cause an unintended exception.

This requires a change in external/webkit

Bug 3172863

Change-Id: I4f4f162253e2af09f63ee582bfce9f75ccf4037b
3 files changed