Js invalid fieldnames

This will add a restriction on "names" to prevent using JavaScript language keywords. There is only one violation so far that will be fixed with this pull (field ```function``` in ```battery_status```, renamed to ```battery_function```).

If would be good to do this for all languages of course.

**I tried considered solutions:**
* Using a prefix for all parameters: works of course, but would result in referencing fields with the prefix in user code which would break everything and is very ugly.
* Rename field names that match a keyword: works as well but it might lead to confusion.