WIP: Initial port of qprof run script.
ENH: Implement CLI.

Add a CLI that reads in an algorithm, loads data,
run the algorithm, and output performance metrics.

The examples are adapted to the new zipline API and
analyses are split into separate files.

Also add config files that run the example
algorithms with preset settings.
TST: Add tests for parse_args().
ENH: Add IPython cell magic.

When zipline is imported it checks whether
it runs in the IPython notebook. If it does,
it registers a %%zipline magic that takes the
same arguments as the CLI with the addition of
a -o for specifying the output variable to store
the performance frame in.

The algo code in the cell is, as of yet, executed
in its own environment rather than that of the
IPython NB which is probably what we want.

Also adds cli option to save the perf dataframe
to a pickle file.

Also adds an IPython notebook buyapple example.
DOC: Add doc strings.
STY: Rename run_algo to run_pipeline.
DOC: Add note on installation to setting up dev env.
DOC: Update README on conda installation, CLI and new example algo.
DOC: Fix typo in release announcement.
DOC: Add release notes for 0.6.2.
BUG: Use env_trading_calender for open and closes data

TradingEnvironment class uses env_trading_calendar for trading days,
but the default trading calendar for open_and_close data, which causes
errors later, because of misalignment of trading days.

The issue can be resolved by using env_trading_calendar for
open_and_closes as well
DOC: Update release notes.
PERF: Use self.updated_portfolio instead of self.portfolio.

The self.portfolio property on TradingAlgorithm internally causes a refresh of
the latest portfolio data every time it's accessed.  We also have an
updated_portfolio method, which only does this refresh when it's deemed
necessary.  Use the latter in API convenience methods instead of the former.
ENH: Add trading controls to zipline API.

Adds four new methods to the Zipline API that can be used as circuit-breakers
to interrupt the execution of an algorithm.  The API methods are:

`set_max_position_size`
`set_max_order_size`
`set_max_order_count`
`set_long_only`

Internally, these methods are implemented by each registering a TradingControl
callback object with the TradingAlgorithm.  During
TradingAlgorithm.__validate_order_params (and thus before any side-effects of
the order call occur), each callback's `validate` method is called with
information about the order to be placed and the algorithm's current state,
raising an exception if the callback detects that an error condition has been breached.
DOC: Update release notes for trading controls.