[libcommhistory] Compare numbers in minimized form for contact match

Although we can't be certain that a minimized match is the best match
for a specific number, it is very likely to be the case, since the
first matching contact we receive is allmost certainly the result of
querying for the match.
[libcommhistory] Sort UIDs in normalized form where possible

Without normalization, sorting will be adversely affected by extraneous
punctuation.