Work around an NSCache deadlock.

Defer the NSCache release in RESTCache's dealloc, in case the NSCache is already in
the midst of flushing itself (in which case deallocing it will cause a deadlock.)
Fixes https://github.com/couchbaselabs/TouchDB-iOS/issues/216