Refactored query engine to have different processing pipeline for raw queries. This enables queries that have a large offset to not keep everything in memory. It also makes it so that queries against raw data that have a limit will only p
rocess up to that limit and then bail out.
Raw data queries will only read up to a certain point in the map phase before yielding to the engine for further processing.
Fixes#2029 and fixes#2030
This fixes all "golint" warnings in the top-level "influxdb" package:
database.go:316:2: can probably use "var tagStrings []string" instead
database.go:1077:6: exported type RetentionPolicies should have comment or be unexported
server.go:337:1: exported method Server.StartSelfMonitoring should have comment or be unexported
server.go:345:3: can probably use "var points []Point" instead
server.go:433:2: can probably use "var groups []group" instead
server.go:498:2: can probably use "var groups []group" instead
server.go:1417:1: comment on exported method Server.CreateRetentionPolicyIfNotExists should be of the form "CreateRetentionPolicyIfNotExists ..."
server.go:1899:1: exported method Server.DropMeasurement should have comment or be unexported
server.go:2153:10: if block ends with a return statement, so drop this else and outdent its block
server.go:2695:2: can probably use "var rows []*influxql.Row" instead
server.go:2876:11: if block ends with a return statement, so drop this else and outdent its block
server.go:3804:1: exported method Server.StartReportingLoop should have comment or be unexported
tx.go:133:4: can probably use "var mappers []influxql.Mapper" instead
tx.go:231:1: exported method LocalMapper.Open should have comment or be unexported
tx.go:254:1: exported method LocalMapper.Close should have comment or be unexported
tx.go:348:1: exported method LocalMapper.Next should have comment or be unexported