Mechanistic insight into substrate processing and allosteric inhibition of human p97