[WIP] Rewrite the Swift support to work with iOS 7

There's still some build system and documentation stuff to do, but all tests pass and I was able to submit a Swift app targeting iOS 7 and using Realm for review with this.

Happens to fix #898 as a side effect.
incrementing count would be more standard/readable/less error prone in future edits.