Fix order of arguments for key check

Due to a bug in python-openssl 0.14, no exception is
thrown when checking a certificate against a private
key if they are given to the context in the wrong
order. This patch fixes the order and also removes
some unnecessarily convoluted code.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>