Added Theano function to calculate y.
Refactored basic agent such to act like dataset and used in place of replay for training. Did this because calculation of y requires knowledge of whether or not state is terminal which can only be provided to agent by experiment.
Moved training out of agent_step to agent_train.
Added support for other modes to replay iterator.