Microcavity controlled coupling of excitonic qubits