Improve glibc2 style salt detection

"salt" part must be terminated by "$". If it's not terminated by "$". We
handle it as normal salt case. That is, the first two characters are
salt.

Tests are named and grouped to clear what we expect.