Remove trailing whitespace
Migrate reddit items to dictionary data structure.

The reddit library used an 'items' variable to maintain a list of
already loaded items. The data structure employed was a simple array.
However, this was inefficient for looking up already loaded items when
new items were loaded to avoid pagination issues when items moved from
page to page, as it was O(n^2).

This patch migrates to a dictionary data structure to achieve O(nlgn)
complexity and efficiently detect duplicate items that slip through
rearrangement due to pagination. Both data structures of a dictionary
(itemsDict) and an array (items) are now used in parallel.

Fix #4.
Undefined type is a string, not undefined literal
Merge pull request #13 from dionyziz/avoid_duplicates

Avoid duplicates