Update qiime.stats code to use latest DistanceMatrix API

There were some minor changes to bipy's DistanceMatrix API. Updating the relevant QIIME code so tests don't break.

Changes:

- ```sample_ids``` -> ```ids```
- ```num_samples``` -> ```shape[0]```

@gregcaporaso can you please review?