Convex Sparse Coding, Subspace Learning, and Semi-Supervised Extensions