factory_test_tools: set firmware bitmap locale index according to bmpblk locale string

This CL extracts firmare bitmap locale string, compare with VPD initial_locale,
and assign corresponding loc_idx if it's available.

TEST=1.crossystem loc_idx=0
     2. (set locale to nl) ./gooftool --verify_vpd
     3. crossystem loc_idx # seeing nl index
     4. (set locale to zh_TW, which is valid but not in bitmap)
        ./gooftool --verify_vpd
     4. crossystem loc_idx # seeing reset to 0

Change-Id: I80e995ddceb0f731557e8e080b362b6a3e85c26a
Reviewed-on: http://gerrit.chromium.org/gerrit/1453
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2 files changed