Make chart legend function correctly.
Make chart legend function correctly.

Removed usages of templateInstance.
Use set() and array functions to get proper change notifications on indicesToGraph and seriesGroupList.

R=charliea@chromium.org

Review URL: https://codereview.chromium.org/2006403002 .

catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,sahiljain/catapult,sahiljain/catapult,sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult-csm,sahiljain/catapult,catapult-project/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult-csm,sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult,benschmaus/catapult,sahiljain/catapult