tpm2_nvdefine: Use NV handle filter to specify NV index
tpm2_nvdefine: Use NV handle filter to specify NV index

Instead of directly converting raw NV index with strtoul,
pass the cmdline argument to hierarchy filtering logic.
This additionally eases specifying nv index simply as an
offset. Eg. tpm2_nvdefine -C o -s 32 -a 0x2000A -x 1 results
in NV index 0x01000001 being defined.

Signed-off-by: Imran Desai <d01faadd01d89088a38277c634ffb396f2b368f8@intel.com>
Signed-off-by: William Roberts <60148e894dabf0b83bde1d460768794cd453c455@intel.com>

01org/tpm2.0-tools,01org/tpm2.0-tools,01org/tpm2.0-tools