Generalize all [Inc]Subtensor optimization to advanced[inc]subtensor[1]

This is a PR to address https://github.com/Theano/Theano/issues/2207. As a first step, I've modified local_subtensor_make_vector to support advanced indexing. Is it correct that only AdvancedSubtensor1 makes sense for this optimization or can there also be a case with AdvancedSubtensor? I'll try to modify the other optimizations as well.