unify identification handling

Javascript and php now both use `identifier` for variables that
contains relevant information to identify the elements.

Naming guideline:
- `elementID`: The id that is saved in the database and identify an
existing element
- `identifier`: Unique identification for elements when adding/editing
a page. This may be the elementID stored in the database for already
existing elements but also can be temporary ids to identify an element
across several requests