pw_hash: Fix functionality on JRuby < 1.7.17
pw_hash: Fix functionality on JRuby < 1.7.17

The previous change to this function broke it on JRuby before 1.7.17 by
attempting to use a variable that wasn't defined (`salt`). To fix this,
define `salt` ahead of time and use that instead of building the salt
later.

cf. https://github.com/puppetlabs/puppetlabs-stdlib/pull/443#discussion_r29718588

fuel-infra/puppetlabs-stdlib,HelenCampbell/puppetlabs-stdlib,puppetlabs/puppetlabs-stdlib,yadavnikhil/puppetlabs-stdlib,DavidS/puppetlabs-stdlib,jbondpdx/puppetlabs-stdlib