Add mode=by_value to EP Framework.

Add a mode whereby a caller can give a policy value instead of the test
case name, and the framework will determine the appropriate test case. This
mode is called 'by_value', and can be invoked explicitly by passing in
mode=by_value, or implicitly by leaving mode undefined and passing in the
policy value. Other resrictions apply, such as:
- Case (case) must be not given.
- Environment (env) must use a real DM Server or a test DM Server. I.e., it
cannot be 'dm_fake' or not given.

Also, updated some variable names (e.g., policy_dict) to correspond to
current and preferred usage.

Updated policy_EditBookmarksEnabled to use renamed packed_json_string()
method.

BUG=chromium:589250
TEST=Run test_that <IP> policy_EditBookmarksEnabled --args='value=true'

Change-Id: I7337dcde6e4ce49e26a7c75fb2b270bfbd90d87d
Reviewed-on: https://chromium-review.googlesource.com/329134
Commit-Ready: Scott Cunningham <scunningham@chromium.org>
Tested-by: Scott Cunningham <scunningham@chromium.org>
Reviewed-by: Jacob Dufault <jdufault@chromium.org>
2 files changed