Locally semisimple and maximal subalgebras of the finitary Lie algebras gl(∞), sl(∞), so(∞), and sp(∞)