util: avoid inserting duplicate Tags

This patch makes the creation call idempotent for Tags - the same tag won't
be created twice anymore.

This required the following changes (mainly around being able to catch a checked
exception from a jdbi transaction):

util:
  - extract getCreateEntitySqlDaoTransactionWrapper and
    checkEntityAlreadyExists in EntityDaoBase
    for create call customizations
  - add a second execute method in EntitySqlDaoTransactionalJdbiWrapper
    which throws a checked exception
  - use NULL-safe operation in getByAccountRecordId in EntitySqlDao.sql.stg
    or the call fails when looking for NULL account_record_id (found in test).
    This may be required in other EntitySqlDao queries.

jaxrs:
 - add toString, equals, hashCode to TagJson (found in test)

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
jaxrs: fix NPE in NotificationJson

In some cases, accountId may be null. Take it into consideration when
building NotificationJson.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>