mediawiki.user: Clean up crypto version of generateRandomSessionId
Follows-up
4860ea3ca6.
* Documented how the byteToHex padding works.
* Move for-statement to after var and function declarations.
* Use permalink for git url (master will change, making the link
less useful).
* Remove dead ", r" comma statement.
* Substitute 0x03 to match the other 3.
* Use 8 instead of arr.length. (Matching the other loops.)
* Use jQuery from closure instead of global $.
* Use $.trim instead of str.trim (new in ES5).
* Add test to assert consecutive return values are different.
Change-Id: I9f59cf60316091e435e4bc9dbd700b9c6e431dac