bin/hooks/commit-msg: Improve parsing

Make sure that the hook does not add a newline between the tags in case one of
them is already present in the commit message.

Also the first state dropping empty lines is not needed since git is doing this
automatically. It never inserts leading newlines into the commit message.

Change-Id: e77cebd0dc