Bugfix/py3 palettes (closes #1337)

A few application of six's iteritems and the docs build on my local machine under py3k 
(Also caught another instance in bokeh.utils.)