When the user entered a driver expression like #frame into a number
field, Blender would crash sometime after. This is because
e1a9ba94c599 did not handle this case properly and ignored the fact
that the user can enter text into the field.
The fix makes sure that we only cancel if the value is a *number* equal
to the previous value in the field.
Note that this could also be handled by ui_but_string_set which would
be a bit nicer potentially. However, I was unable to find a clean way of
passing data->startvalue into that function. uiHandleButtonData is
only known locally inside interface_handlers.c.