Fixed a thread-safety bug with the OperationMethods plugin.

The plugin hooks into the after initialize hook of the client
class. It conditionally defines operation methods for each operation
defined in the API model if the client class does not already respond
to the `#operation_names` method.

The plugin defines these methods behind a class mutex, but incorrectly
defines the checked method first, instead of last, before releasing
the mutex.

Simply moving the method definition of `#operation_names` to the last
line before releasing the mutex solves this problem.  Also, adding
a double check inside the mutex ensures the methods aren't defined
multiple times.

See #64