VMware: test_driver_api: Use local variables in closures

Some closures were unecessarily storing constants used by closures in
the test object. This change converts them to use local variables
instead. Values which are modified remain in the test object.

Additionally, 1 unused value is removed.

TrivialFix

Change-Id: I0164bf23f4d51505871cee8db170b73534410c4a
Merge "VMware: test_driver_api: Use local variables in closures"