General orthonormal systems and certain problems of approximation theory