Creation of entanglement and implementation of quantum logic gate operations using a three-dimensional photonic crystal single-mode cavity