Cartan subalgebras in Lie algebras of associative algebras