Bug 1044525 - Use a WeakMap to hold layout key objects, mapped from DOM elements, to avoid poking with DOM elements in various modules aside from renderer.

- Also, removed parseInt() on keycodes where suitable as we now retreive "number" from the objects held by WeakMap.