bug fixes and REST API capability

Fixes:
- checkboxes
- dropdowns
- radio buttons

REST API:
- Uses Phil Sturgeon’s REST API library
- Still supports being included directly if $forms is sent to the
controller as an array
- API allows one URL that can be submitted to from various places.