rename internal property constructor to klass

Since constructor already is a special property, I renamed it to klass to make the code a little bit easier to read
feature: registerFactory (naive implementation)
DRYing implementation, removing so much copy-paste
readme: Add documentation about registerFactory
Merge pull request #1 from kesla/registerFactory

Register factory