Mojo: Change tack on failures to pass handles (don't return "unimplemented").

Before, I ambitiously tried to make WriteMessage fail with
MOJO_RESULT_UNIMPLEMENTED if it wasn't going to be able to pass some
handles that it was asked to.

Now, I'm just going to let it "succeed", close those handles, and have
them emerge on the other side as MOJO_HANDLE_INVALID.

The reason is that a) eventually (hopefully) we'll support passing all
(or nearly all) types of handles; b) it's extremely complicated (verging
on intractible) to correctly return MOJO_RESULT_UNIMPLEMENTED.

More on b): WriteMessage() is transactional. It either succeeds (and
takes ownership of all the handles) or fails (and leaves all the handles
alone). To check if it's going to be able to send a given set of
handles, it must not only check that set of handles, but all the
messages that are enqueued on message pipe handles in that set, etc.
(transitively). But with the current multithreaded design, it'd have to
bring everything (i.e., the transitive closure of the set of handles
being passed) to a halt, check that it's going to succeed for every
handle involved, and commit to the operation or restore the state
completely (if it can't send any handle in the transitive closure). This
would probably only be tractable with a "one big lock" design.

R=darin@chromium.org

Review URL: https://codereview.chromium.org/155173002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249049 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 249049