Added node.js compatibility, mocha test and patches from other forks

Hi,

First of all, thanks for your work :).

We've added some glue code that allows using qrcode.js in nodejs.

Additionally, we've:

- integrated changes from other forks,
- extracted GIF generating code to separate function, so it can be called directly (for example: to write GIF to file),
- added test to be run with mocha (http://mochajs.org/)

It would be great if you could merge it all into official repo.
Please let us know if anything has to be changed before merge, or if those changes cannot be merged at all for some reason.

Thanks,
Regards