Add touch support for mobile devices

Opening ‘brick’ on ‘touch’ is differenterent and than with ‘click’.
For click this was the case:
function ended() binded to ‘mouseup’ event. Event propogation stops
there. However ‘click’ event happens after ‘mouseup’ and it is binded
to another method ‘click’ which happens after ended. There decision is
made if ‘brick’ was dragged or clicked.
With touch it is different. You don’t have the luxury of two similar
events, to bind two different functions. However the same call order
must be preserved: ended() -> click() -> sample.js#click. This commit
adds just that. Some parts are not pretty, like if in ended function,
but this is the most delicate solution I could come up with while
working with one event.
Merge pull request #28 from lawreenas/master

Add touch support for mobile devices