Fix test flakes; dict keys sorted

https://github.com/ContinuumIO/bokeh/issues/1119