Use correct sql types for primary keys

PostgreSQL is strict about the sql type matching that of the columns
[FIX] minor fix to improve resolving entity IDs
(applicaition/host/severity)

Explicitly differentiates between ID initialization and when the entity
doesn't exist.
Merge branch 'master' of git://github.com/sebduggan/BugLogHQ into sebduggan-master
Fixed bug when entryID was not provided; added support for email
debugging; added toggle for including HTMLReport
Pass entryID to sendToEmail() to display bug report url
Use sendToEmail() instead of direct cfmail invocation to send emails
Use a more descriptive message for email alert and include bug URL
notifyService() needs some minor null handling when REST is used.
Merge remote-tracking branch 'upstream/master'
Null values omitted, as suggested by Oscar
Merge pull request #71 from mz83/master

Minor rewrite, as requested in issue #69
[Fix] Avoid passing empty list in call to get() in findByIDList(). Fixes
#72
Merge branch 'master' of https://github.com/oarevalo/BugLogHQ.git