gooftool: Use singleton gooftool object in GetGooftool

We can save time using global gooftool object in GetGooftool.
GetGooftool is called many times in Verify and Finalize since every
method invokes one GetGooftool and init a new gooftool object. However,
there is no need to have different gooftool objects given the same hwid
version and database.
In hwid test the hwid bundle might get updated, since hwid test is in
its own process, gooftool will be inited again so it will be fine.

BUG=chrome-os-partner:24847
TEST=run gooftool command and measure the time.

Change-Id: I312e2903dba5f64ba7af6df9492f38c786f4a7c5
Reviewed-on: https://chromium-review.googlesource.com/183912
Reviewed-by: Heng-ruey Hsu <henryhsu@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
1 file changed