Support AMD

Added an export module, because the original state-machine.js supports AMD, which feature was not available from TypeScript before this patch.
Fix typo on restify type definition

InvalidArgu**e**mentError => InvalidArgumentError
fix polymorphism in Async type signature (how the hell were people using it before??)
fix memo type
Added CKEditor definitions
- Added urlrouter
Merge pull request #1848 from soywiz/urlrouter

- Added urlrouter
Corrected location of `current`

Reference : http://gruntjs.com/api/inside-tasks
Merge pull request #1849 from borisyankov/def/gruntjs

Corrected location of `current`
Fix typo on test
Merge pull request #1829 from santialbo/patch-4

Fix typo on restify type definition
Added missing write signature

This is also consistent with the doc comments already there.
Merge pull request #1850 from borisyankov/def/gruntjs

Added missing write signature
AMD support

Added AMD support as the original ZeroClipboard.js has direct built-in support for AMD as well.
Merge pull request #1851 from balassy/patch-4

AMD support
Enabling 'when.d.ts' to be also usable as an external module so that is can be included like 'import When = require(../when/when);'
Added new() to IResourceClass

Added `new(dataOrParams? : any) : T;` to `IResourceClass<T>` to allow creation of a new instance of the resource using the `new` keyword, which is required to create a new resource object of type `T`. 

In the [AngularJS documentation example](http://docs.angularjs.org/api/ngResource/service/$resource) this change would allow for line 27 `new CreditCard({number:'0123'});` where `CreditCard` is `IResourceClass<CreditCard>`. Without this change we get `error TS2083: Invalid 'new' expression.` when new-ing the resource.
small API updates for highland 1.19.0
improved bluebird definitions

changed part of module to static class members
- enables Promise.try()
various small fixes and tweaks
smoothie: fix streamTo signature