Devices implementation for motor.js

Includes support for 3-pin directional, brake and current sensing pins.
Also adds tests and additional documentation.