Infinite horizon optimal control for nonlinear interconnected large‐scale dynamical systems with an application to optimal attitude control