implement selectWithin

It's doing an exhaustive all-against-all search of atoms. It's quite
slow, even for small structures. A more clever algorithm (e.g. using
binary space partitioning) will have to be implemented. For now, just
having a working implementation was more important.