Factor out the rules for merging tiles.

The old code hard-coded the rule "a.value === b.value" in two places,
and also hard-coded the merged tile's value as "a.value * 2".  To make
it easier to hack together variant versions, I've factored this logic
out into a single function GameManager.resultOfMerging(from, to).
If the tiles can't be merged, the function returns null.
If they can, the function returns an appropriately initialized new Tile
(except that the position may safely be left as "null").

No intended functional change.