refactoring: extract karatsuba algorithm to standalone class