feat(mdtest auto): add more options to group devices

mdtest supports --groupby option which allows users to provide grouping
keyword for mdtest to group devices and run tests under different device
settings based on app-device coverage.  --groupby supports options like
'device-id', 'model-name', 'os-version', 'api-level' and 'screen-size'.

Fix minor bug for mdtest script to deal with the first run.

Change-Id: I54a6b91fcd40d995e6413b3d556c3c1fc526c6a5
7 files changed