fido/bio: make virtual biometric authenticator stateful

The current bio enrollment implementation in the virtual CTAP2 device
is stateless and does not have any storage. This CL makes it stateful
by tracking enrollments, remaining samples, and current enrollment
state.

Note that I am also considering switching the list of enrollments from
vector<pair<vector<uint8_t>, string>> to map<vector<uint8_t>, string>
for readability and simplified code in the virtual device. Feedback on
that idea would be much appreciated!

Bug: 974046
Change-Id: I8d2b1b5963b37989aea02d32596a34bbbbd6e774
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1666801
Commit-Queue: Matthew Webb <noviv@google.com>
Reviewed-by: Kim Paulhamus <kpaulhamus@chromium.org>
Reviewed-by: Martin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#672250}
7 files changed