pagination support; lots of tests and fixes

Squashed commit with changes from Aljosa Mohorovic and Goran Cetusic.
partially fixed compatibility with python 3.3, distribute and httpretty