Added constants.js file to core

Closes COUCHDB-2400