Update ssid.js

Move diceware password generator code to a separate function so it can be called by jQuery, etc. later.