libbrillo: Add a way to construct FileDescriptor without duping FD

Add FileDescriptor(base::ScopedFD&&) and operator=(base::ScopedFD&&) to
create FileDescriptor without calling dup().
Also add release() to take the ownership of the FD without calling
dup().

BUG=None
TEST=build
Change-Id: Id96c3dc76e180bf11b674ad08d7d19f75f854c98
Reviewed-on: https://chromium-review.googlesource.com/1025332
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
1 file changed