'refine' Button now cycles through three states.

(As described in the source) The implementation is - as always - horrible. At
least all the captions are in one place (update_geometry), but they shouldn't
be even in there.
Moved button states to three actual buttons.

Only one button is visible at a time. Since the labels are fixed and do not
belong into js, this is a way better approach. I switched 'bounds_changed'
callback cyclicly instead of defining global states.