Add URLs for translation states and text flow data.

Also changes how REST URLs are specified in code. This was discussed
and the prevaling opinion was that specifying the entire path after
the base REST URL for each endpoint would be easier to work with.
Despite the repetition, benefits are:

 - easy to see which variables are needed for each URL.
 - fairly easy to recognize visually which URLs are similar.

Updates JSHint to prevent warnings for valid declaration of functions
that will be hoisted.