Testing Dirac leptogenesis with the cosmic microwave background and proton decay