Implement the close() API for Message ports
The close API has to consider these cases:
1. A message port can be in a pending state
2. A message could be queued in renderer waiting for conversion
Therefore close() immediately closes the port, but it does not
cleanup the resources until all the messages are transferred.
BUG=
393291
Committed:
https://crrev.com/1f47db6eeea87febb755db2c498335fd9bb226b1
Cr-Commit-Position: refs/heads/master@{#318271}