add basic tests; use selection-position module

A few more changes:
- replaced the #getPosition function with a selection-position (bmcmahen/selection-position) component, which is cross-browser.
- added a few basic tests
- delete el from options when #remove is called
- fixed a stupid error in the last commit

cheers.