Improve performance of subset() and superset().

Using a different construction method for the sparse matrix
used makes the methods a little faster. There is probably
still room for improvement by refactoring to avoid the
sparse matrix products.
Merge pull request #209 from atgeirr/improve-subset-superset

Improve performance of subset() and superset().