smallHash: simplified and improved performance

Unchanged behaviour
XSS flaw correction

Closes issue https://github.com/sebsauvage/Shaarli/issues/134
Merge pull request #145 from Alkarex/patch-1

smallHash: simplified and improved performance
Merge remote-tracking branch 'sebsauvage/master'