Direct and adaptor-mediated substrate recognition by an essential AAA+ protease