add CommonJS and AMD support

using RiotJS as a node module feels weird now

```
require('riotjs')
var riot = window.riot
```

this fixes it to
```
var riot = require('riotjs')
```