Geometric Collocation Method on SO(3) with Application to Optimal Attitude Control of a 3D Rotating Rigid Body