refactored models to remove merge errors

- implemented Polymorphic mixin
Merge branch 'master' of github.com:tjwebb/xtuple-api