HasOnePolymorphic and HasManyPolymorphic with tests

I'm working on converting an old RoR application to PHP and it has a few polymorphic relations so I added the functionality to the ORM.

I was pleasantly surprised of how little code was needed in to implement this. There would have been even less code if it wasn't for this bug https://bugs.php.net/bug.php?id=65576 in PHP.

Everything is tested and 100% compatible with existing code.

(I have only added HasOnePolymorphic and HasManyPolymorphic relations but I'll be happy to add BelongsToPolymorphic and ManyToManyPolymorphic relations later on.)