removed php extension from the api.js uris of coolstart.net
external.php "simplified"
api.js tested with jshint and fixed
api generation protected using closures to allow each widget to have a valid and secure api object (this is to prevent the modification of priate remote variables of one widget from other widget).