Bug 1100945: adding a PasscodeHelper

This should do as an initial draft.
Looking forward to any kinds of feedback, especially lines 70-73 and 88-100. :)
And the constructor-prototype structure I mentioned is a plain JavaScript style:

    var PasscodeHelper = function() {}; // constructor
    PasscodeHelper.prototype._makeDigest = function() {} // append something to the prototype

It's not so neat, yes, but you can avoid get into the trouble of using literal object as instances.