add API for programmatic smfgen

# summary

this allows you to `require('smfgen')`, as it exposes the `emitManifest` method.

The test is a little strange as it passes in a fake stream to retrieve the generated XML manifest as a string, but other than that this is pretty awesome

# goal

my long term goal is to have a command line tool to create smf manifests from data passed in as arguments.  `smfgen` already has most of the work done, so it would be nice to only have to `require` it, and build the JSON data myself in the command line tool.  basically: a `posix-getopt` => `smfgen` bridge.

I realize some tools exist, but non of them are perfect.

- [smfgen](https://github.com/davepacheco/smfgen): creates SMF manifests, but only supports data passed in as JSON
- [manifold](https://code.google.com/p/manifold/): creates SMF manifests, but only supports interactive data input (terrible for scripting)
- [svcbundle](http://www.oracle.com/technetwork/articles/servers-storage-admin/howto-svcbundle-manifest-profile-1866525.html): pretty cool, probably what i want, but only in solaris 11