better type casting from js types to db types, several type related bugfixes
fixed https://github.com/eventEmitter/ee-orm/issues/29