added pruning functions. Refactor code to use them
Backport np.unravel_multi_index for numpy <= 1.5. Update docs
Merge pull request #78 from ChrisBeaumont/prune_functions

Collection of pruning functions