Moving capture to a plugin

Includes the cordova.js from this branch https://github.com/apache/cordova-js/pull/33