Unbind handlers before binding new ones

Sometimes `photobox.open` may be called before `close`. 

E.g.: `history: true` and 

1. open a photobox with 4+ photos
2. mouse click next
3. click history back
4. press right arrow key => it skips through 1 photo

This PR simply ensures that no handlers are never binded more than once.