General analysis of two-body nucleon decays