Fixed the crashing bug https://github.com/couchbaselabs/TouchDB-iOS/issues/266
Merge branch 'master' of github.com:mz2/TouchDB-iOS into mainline