always join multiple content streams with whitespace

* to avoid smashing two unrelated tokens together
Modify buffer token parsing to account for extra token whitspace that may be well beyond 10-20 characters
Merge pull request #52 from rstawarz/master

Add spec and fix issue for extra token whitespace during token parsing
always de-ref the document page count

* just in case it's an indirect object
* thanks to Igor Jorobus for reporting
prepare for release
add a spec PDF that contains an outline

* for Sergey Zavilkin to use in specs
use Fixnums instead of Strings in our homegrown lexer

* perftools.rb was showing ~49% of the time extracting text from a large
  sample file was spent in Buffer#prepare_regular_token
* with this patch that falls to ~40% of time
* still not great, but a significant improvement
* this shows the dangers of writing our own lexer and parser. It's
  probably worth investigating if we can switch to a parser gem that
  does a better job
save a copy of a debugging script I've been using
these strings are binary, not UTF-8

* it shouldn't matter, but a test is blowing up on RBX
fix filename in my benchmark script:
short cirbuit Buffer#prepare_tokens when lexing is finished
split Filter class into multiple classes with a single responsibility
Revert "short cirbuit Buffer#prepare_tokens when lexing is finished"

This reverts commit a7adfdd48131edc8b3a8a6df7db063f8b35c3ff4.

This isn't 1.8 friendly
try using an LRU cache to cache commonly accessed objects
move these requires to where they belong
make ObjectCache available document-wide

* to experiment with caching 'stuff' at a higher level than just PDF
  objects
* prime candidates are PDF::Reader::Page and PDF::Reader::FormXObject's
  that can memoize expensive parsing calls
memoize tokens in PDF::Reader::FormXObject

* so multiple walk() calls only tokenise the content stream once
Rounding to suppress slight variations in the Y-coordinate - preventing some lines or blocks of text from being read out-of-order
Merge pull request #57 from strobejb/master

Fix to prevent some lines being read out of order
Revert "Rounding to suppress slight variations in the Y-coordinate - preventing some lines or blocks of text from being read out-of-order"

This reverts commit b5693908784e98db3947e9b6ddc1078fc60311ab.

Unfortunately this commit wasn't ruby 1.8 compatible. See
http://travis-ci.org/#!/yob/pdf-reader/builds/1790664