make random_password securely random

(cherry picked from commit 27e18332d1b7bf900b8f99907927e4e577447552)
Use SecureRandom.base64

(cherry picked from commit d965a60dc72b052da8624f4b86e35fc409fa49b5)
Merge pull request #986 from vuntz/secure-password

[stoney] make random_password securely random