misc bugs with relations

Well, misc strange bugs, mostly visible when we load ToOne entitty from not-owning side. Also, fixes edge cases when we can't resolve Abstract Discriminator entity type before we actually load disc value.

Should fix #87 as well. Should be merged only after @mpclarcson checks ).