[DBClientHatohol] Fix wrong count of triggers

The previous implementation of getNumberOfTriggers() counts number of
hosts instead of triggers!
[DBClientHatohol] Make sure to avoid counting same records at getNumberOfTriggers()

Same records may be included because we are using inner join to
select hostgroup and multiple hostgroups can have a same host.

It will occur when the query doesn't have target hostgroup id and
the user is allowed to access to hostgroups partially.
[DBClientHatohol] Rename a function

getNumberOfTriggers ->
getNumberOfBadTriggers

I'll add a function with the former name to get the number of total
triggers.
[DBClientHatohol] Add a function to get total number of triggers
[testDBClientHatohol] Test the ALL_HOST_GROUPS case of getNumberOf*Triggers()
[DBClientHatohol] Remove a needless space
[DBClientHatohol] Fix again the issue which counts same triggers multiple times

Sorry, 8a8dc80a doesn't make sense. I misunderstood behaviour of
arg.useDistinct. Now I use a string which includes server ID &
trigger ID to distinguish duplicated records because count()
function doesn't accept multiple arguments.

Although there are some ways to use multiple columns to distinguish
duplicated records on counting number of rows, I think it is the
most simple solution at this time. On the other hand I think using
sub query is the formal solution (github issue #168), so this code
will be removed after the sub query solution is introduced.
Merge pull request #206 from project-hatohol/fix-count-triggers

Fix counting number of triggers again
[testDBClientHatohol] Remove a needless test message
[DBClientHatohol] Fix wrong grammar in a comment
[server][HatoholArmPluginGate] Fix the deadlock.
[server][HatoholArmPluginGate] Fix an invalid memory access.
[server][DBAgentMySQL] Fix a bug that generates a wrong SQL statement when the mumber of added columns > 2.
Merge pull request #211 from project-hatohol/fix-add-columns

[server][DBAgentMySQL] Fix a bug that generates a wrong SQL statement wh...en the mumber of added columns > 2.
Merge branch 'master' into issue-171
[server][HatoholArmPluginGate] Remove a needless space.
Merge pull request #212 from project-hatohol/issue-171

Issue 171: Fix some problems in the pull request #204.
[server][HatoholArmPluginGate] Merge issue-171.