Refactor common component functionality to component.js
Use component.js in all components
Fix tests
Add Component constructor to gearsloth library
Merge branch 'component-refactor'