Minor non-functional fixes:

- javadoc
- constants
- Log the exception stack trace for better diagnostics.
- Java 7 improvements
- Use JavaScript event names without the 'on' prefix to avoid the warning from Wicket's AjaxEventBehavior
- add TODOs for potential problems
- remove casting where not needed
ISIS-880: fix appearance (and minor behavioural fix) for password fields.
ISIS-872: Merge remote-tracking branch 'martin-g/minor-improvements'

* martin-g/minor-improvements:
  Minor non-functional fixes: