cpp: Changed mix_states behaviour

Now it don't throw exception but returnes non-positive error_info
object to determine if mix_states was successfull
test: Don't use inline if/else syntax

Looks like python-2.6 doesn't understand it