Bring over orm changes done in bit-android. Most of the changes are
related to async execution that is required on android, but it is going
to be useful for bit as well. In addition, common code makes it
worthwhile.