Add a preprocess-config task to create constants.js

* Use grunt-preprocess to do the pre-processing.
* Add a selectconfig task which will select the appropriate config file to use.
** if process.env.CONFIG_FILES is specified, use that.
** use production.json when building dist resources.
** local.json by default