Reorganize MessageEncryptor

According to OpenSSL's documentation, cipher.random_iv must be called
after cipher.encrypt and will set the generated IV on the cipher.

Ruby 1.8.7 moved OpenSSL::CipherError to OpenSSL::Cipher::CipherError.
Since Rails 4 requires at least Ruby 1.9.3, support for the old
location can be dropped safely.