MAINT: Refactor AlgorithmSimulator.transform.

Breaks out the main snapshot processing loop into its own function, and does
some minor variable renaming-shuffling.

Adds `TradingAlgorithm.on_dt_changed`, a function to be called when the
simulation dt changes, prior to processing any events.

There should be no difference in behavior as a result of this change.
MAINT: Add comments and rename methods in PerformanceTracker.

The function that handles a market close for daily frequency changed from
`handle_market_close` to `handle_market_close_daily`.

The function that is called at on the closing minute each day when running
minutely changed from `handle_intraday_close` to
`handle_intraday_market_close`.
ENH: Remove dividends from the event stream.

Removes support for handling dividends as part of the algorithm
simulation stream, replacing it with an API in `TradingAlgorithm` for
supplying dividends as a DataFrame.
STY: In test_perf_tracking, import datetime/timedelta via from-import.
DOC: Rename 'guid' to 'id' in dividend tracking logic.