Convex Quaternion Optimization for Signal Processing: Theory and Applications