Refactor skipping of blank periods

Moved the logic to calculate how many periods a result should be
shifted into the response module. Each result class controls how it is
shifted so that the Query class can be greatly simplified.