Drop RPC securemessage.py and crypto module.

As of 579109cab946a54f86b04724f0b6cb71fb027c04 Nova should
have the openstack common crypto modules to support
rpc/securemessage.

The RPC securemessage stuff will eventually get integrated into
oslo.message. As is it is only partially complete in oslo-incubator
and it is getting synced into various projects (and breaking
some things).

This commit drops securemessage.py which was missing classes in
the crypto module anyway and would not have worked.

Closes-bug #1241634

Change-Id: I050d620a51042007aa4696fa439bd99c7597a9a4
Merge "Drop RPC securemessage.py and crypto module."
Fix consoleauth check_token for rpcapi v2

In 48dd52095869d36970de232f5dfa60656fcd578b support for the 2.0
consoleauth rpc API was added which missed the return statement in the
check_token method. Because of this all the components that had to
verify a token against consoleauth component would fail to do so.

This patch fixes the check_token method and extends the tests to cover
the new v2.0 class.

Change-Id: I4e5186943d28609083f723f4b43ab6f0ecbffd27
Ensure that libvirt files are not world readable

The files that nova shares with libvirt and QEMU may contain user
sensitive information and it might be a problem if those files are
visible for all the users in the machine. These files include the images
under instances_dir, the base images and snapshots.

This patch introduces a new decorator that will change the user
file-creation mask temporarily during the call of a method, allowing
us to mark methods that shouldn't create world readable files thus
protecting them.

Also in this patch, all the calls that interact with libvirt owned files
have been modified to use rootwrap so they can still access these files
(for resizing an image, snapshoting a disk or migrating an instance).

Fixes bug 1129748
Fixes bug 1227027

Change-Id: Ib290f8df20a9e29ed98faec221f607b685e26da4