John Lloyd breached code of conduct over email to think tank, inquiry finds