Tuning the band gaps and work functions via topology and carbon concentration: a first-principles investigation of C(x)(BN)(y) compounds.