reduce asymptotic overhead of asserting bounds

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Merge branch 'unstable' of https://git01.codeplex.com/z3 into unstable