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: I2fbf4e7b6a398992a3e3688d9d53851bfdcd4be1
JIRA: CYAN-1817
Issue: https://jira.cyanogenmod.org/browse/CYAN-1817
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>