Doctests and clustering methods

Added a couple of doctests to the simpler functions in preprocessing.py
Added DBSCAN and KMeans clustering to cluster.py

Unsure how to add a test to something non-deterministic like DBSCAN -- maybe apply clustering to the iris dataset with a fixed random-state?
I have never heard of R-trees but they sound mysterious and fun. =P I'll have a look. Thanks!

btw, how comfortable are you with rebases? If you don't find them scary, it'd be good to rebase this on the current master, so you can have the automated testing on Travis! =)