Fixed bugs in MovableHelperMethods' `listen` and `unlisten` functions
Fixed bugs in MovableHelperMethods' `listen` and `unlisten` functions

Summary:
Previously, `listen` would break if you tried to add multiple handlers for the same
eventName and ID, and `unlisten` didn't properly re-index events after removing handlers from
an array. Both of these bugs are now fixed: calling `listen` with an eventName and ID that already
has a bound handler replaces the existing handler, and `unlisten` appropriately re-indexes the
listener map.

Test Plan:
- (This is easiest to test with MovablePolygon's click-to-add-points mode and an `update` call.)
- Added a bunch of `console.logs` in `listen` and `unlisten` along with some arbitrary `listen` calls in `MovableLine.update()`.
- Verified that `this._listenerMap` is re-indexed in `unlisten`.
- Verified that existing handlers are over-written, i.e., that calling `listen(eventName, id, f)` is idempotent for the same `f`.

Reviewers: aria

Reviewed By: aria

Differential Revision: http://phabricator.khanacademy.org/D14170

abe4mvp/perseus,learningequality/perseus,chirilo/perseus,ariabuckles/perseus,daukantas/perseus,daukantas/perseus,abe4mvp/perseus,iamchenxin/perseus,sachgits/perseus,learningequality/perseus,ariabuckles/perseus,chirilo/perseus,alexristich/perseus,alexristich/perseus,ariabuckles/perseus,ariabuckles/perseus,iamchenxin/perseus,sachgits/perseus