New utilities for JS configuration

These are the utilities presently used by sbt-rjs. I felt that it would be useful to make them more widely available.