tls: updated certificate mismatch message

Added information to the message if the name found is an CN or an
alternative name. Also print a message if no CN was not found instead
of (null).
nla: invalidate sec handle after creation

If sec pointer isn't invalidated after creation it is not possible
to check if the upper and lower pointers are valid.

This fixes a segfault in the server part if the client disconnects before
the authentication was finished.
Merge pull request #1330 from bmiklautz/misc_fixes_20130701

Misc fixes