WebSubmit: support for elements' custom_level

* Adds support for optionally setting a custom_level ('M' for mandatory or
  'O' for optional) for each element through the element description,
  overriding the default level. Useful for dynamically produced elements.
  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: print white space instead of None

* Avoids printing "None" (by passing None to string formatting).
  Instead, print a single white space.  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: more robust JavaScript check

* Before running a custom JavaScript function on an element, check if
  the element is not undefined.  (PR #1741)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>