Prevent thread passing

Copying a realm between threads is not supported, and it is easy to check if it has happen. Instead of apps crashing in strange ways, it is better to tell the user what is wrong.

@emanuelez @bmunkholm @cmelchior 
include cancelTransaction as well.