Calculator: Fix bin and hex modes and improve logic

* Fix buttons status when changes from all base modes in all the layouts
* Improve view id search logic (find all ids, not only the first)
* Fix overflow in hex conversion (author Will Harmon)

Patchset 2: Revert "do not allow floating numbers in hex and bin modes"
            Allow dot in banned resources
Patchset 3: Allow matrix in bin and hex modes

Change-Id: I02ac3d5b51929512e444ab2a6b371efc12e8cca2
JIRA: CYAN-1817
Issue: https://jira.cyanogenmod.org/browse/CYAN-1817
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>