Write library version in build files

This PR adds the most recent Git tag (`git describe --tags`) to the build files.

The `ol.js` now looks like this:

    // OpenLayers 3. See http://ol3.js.org/
    // Version: v3.0.0-gamma.3
    (function(){var ...

And `ol-debug.js`:

    // OpenLayers 3. See http://ol3.js.org/
    // Version: v3.0.0-gamma.3
    var CLOSURE_NO_DEPS = true;
    ...

If there are further commits after the tag, you will also see the last commit. For example, after I made this commit, the version changed to `v3.0.0-gamma.3-1-g076f53c`.

Note that you'll have to run `git fetch upstream --tags` to get all remote tags.

closes #1792
I think it is important that the compiled output be the same regardless of whether this module is run as main or `require`d from elsewhere (and the `main` function is run).  Instead of adding the header only when writing to an output file, the header should unconditionally be added to the compiled output (regardless of whether this output is passed to a callback or written to a file).