Add support for the remote API call "wait". (please review)

...which blocks until the container is stopped and returns the status code.  Added some tests for this functionality.

Not sure if the API for wait (the return value mainly) is great.