Set load_on_pending=True for namespace relationship of versioned objects.

This prevents errors when constructing the transaction log. Otherwise, if e.g.
a Block object was constructed with
block = Block(namespace_id=ns_id, ...)
then attempts to access block.namespace in the after_flush handler may
erroneously return None.