Adding PAM implementation

Example usage in combination with the Distance package: http://nbviewer.ipython.org/gist/lendle/8820029