Small cleanup changes
Fixed compilation with SMT enabled, shared implementation of find_msb
/approx_sqrt
, some indents and sync log extension.
Added cleanup for update_manabar
(it caused overflow problems in testnet) - changes follow suggestions from comments.
Edited by Andrzej Lisak