Run selection and data cleaning at the Majorana Demonstrator