First-principles calculation of W/WC interface: Atomic structure, stability and electronic properties