Implement optimisation for finding shapes in area, add relevant tests.
This also handles edge overlaps, so update the docs to reflect this.
Fixes issue #9