MB-7316: Check all 1.8.x sqlite files for vbucket_states table

That is, be sure to check the master sqlite file, not just the *.mb
shard files.

Also, the states field might be a writable buffer (instead of a
string), which Python can't use as a dict key.

Change-Id: I477176241f759cb943ea8a52594f640a20e1d84d
Reviewed-on: http://review.couchbase.org/23022
Tested-by: Bin Cui <bin.cui@gmail.com>
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Reviewed-on: http://review.couchbase.org/24042