added destructors to Gate, GatePort and Wire. cleaning up memory whenever one of these objects is deleted.