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-872: Merge remote-tracking branch 'martin-g/minor-improvements'

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