trunks: Fixes and enhancements to support tpm_manager on brillo

- Enhanced NV utility methods
- Support PolicyRestart for policy sessions
- Support for read/extend PCR from trunks_client
- Cleanup scoped_ptr -> std::unique_ptr and other cleanup
- More robust factory semantics
- Support for setting dictionary attack parameters

TEST=builds on AOSP and chromiumos, unit tests, manual tests

Change-Id: I34fff802c0983b34e6d1ed082cb85ce57f08a54d
26 files changed