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?
shape (n_samples,). Add "shape" above, too, and specify type where possible.