BUG: Fix _select_most_recent_symbols_chunk.
BUG: Fix _select_most_recent_symbols_chunk.

Fixes a bug where _select_most_recent_symbols_chunk assumed that non-aggregated
columns in a GROUP BY expression would resolve to the first record in the
group.

Previously we rendered a select like this:

```
SELECT sid, symbol, company_symbol, share_class_symbol FROM (
    SELECT sid, symbol, company_symbol, share_class_symbol
    FROM equity_symbol_mappings
    WHERE sid IN (<list of sids>)
    ORDER_BY end_date ASCENDING
)
GROUP BY sid
```

It appears that on older versions of SQLite, this reliably gave the last symbol
for all symbol mappings associated with ``sid``, but on newer versions (or at
the very least, in whatever configuration Travis is currently using), it's no
longer the case.

As of this change we now render the following query instead:

```
SELECT sid, symbol, company_symbol, share_class_symbol, max(end_date)
FROM equity_symbol_mappings
WHERE sid IN (<list of sids>)
GROUP BY sid
```

This uses the fact that SQLite treats the max() and min() aggregation functions
specially for aggregation functions:

> When the min() or max() aggregate functions are used in an aggregate query,
> all bare columns in the result set take values from the input row which also
> contains the minimum or maximum. Only the built-in min() and max() functions
> work this way.

humdings/zipline,quantopian/zipline,humdings/zipline,quantopian/zipline