Pre-Check Column Number in Prefix Query Optimization

Summary:
Feature: Prefix Index Queries Optimization

This pre-checks the column number, before checking column by column,
in the prefix optimization code from:

	https://reviews.facebook.net/D15921

I will try to squash this with that diff in the future, but will
wait, keeping this separate for now, in case it causes licensing
issues with getting the original change included upstream.

This was suggested on github by https://github.com/tbdingqi here:

	https://github.com/webscalesql/webscalesql-5.6/pull/5

Test Plan: Jenkins

Reviewers: pivanof, darnaut, inaam-rana

Reviewed By: inaam-rana

Subscribers: WebScaleSQL, jtolmer, CalvinSun

Differential Revision: https://reviews.facebook.net/D20643