Add 'frequencies' function
Expand unit tests for frequencies and move to test_core
Fix PEP-8 spacing.

I left the existing "from Queue import ..." and "def merge_sorted..."
with no blank line between, because the import looks a bit orphaned
separated by two spaces. IMO imports should be at the top of the file
where one expects to see dependencies, but it's perhaps a minor point.
Add back doctest, with execution suppressed
Merge pull request #1 from eigenhombre/master

Add 'frequencies' function