Sort AC search results by default series - Fixes #1348290

The charm search autocomplete now sorts the results returned from the charmstore so that the promoted charms which match the users default series for their environment are listed first.
I guess in tests you have to supply the function anyway, it could just return precise in the test vs the default in the code.