Tweaked measure JS generation endpoint to take options

This needs to be merged at the same time as projecttacoma/bonnie#35