Various improvements for extension hardening and more unit tests.

- Defensive NPE protection around possible null GerritHandler
  (future-proofing)
- Moved synchronization into a "ConcurrentHashSet"
- Added unit tests for the form validation (cycle detection)
- Added check that the QueueTaskDispatcher barrier was being called in
Gerrit Trigger