CORE,REGISTRAR: changed SimpleJdbcTemplate to JdbcTemplate

- SimpleJdbcTemplate is marked as deprecated so JdbcTemplate should
  be used instead. Class API is the same, but support ResultSetExctractor.
- Removed some unused imports.
- Instance check is kept in Utils.getNewId() since somebody still may pass
  this class as data source.