libbase: add Fdopendir that takes a unique_fd.

Using fdopendir with unique_fd correctly is more annoying than it
should be, because fdopendir doesn't close the file descriptor
received upon failure.

Add an android::base::Fdopendir that does that handles the failure
case.

Bug: 118818285
Test: treehugger
Change-Id: I5dbbe0eb82242bc7716f84735ffc7644febcfd65
1 file changed