Adjust Bin2Dec similar to what we did for Hex2Dec in Bug 57196 and fix some smaller problems in the implementation found while adding full unit tests