binfmt_flat cleanups and RISC-V support

From: Christoph Hellwig
Date: Mon Jun 10 2019 - 17:25:01 EST

Hi Greg,

below is a larger stash of cleanups for the binfmt_misc code,
preparing for the last patch that now trivially adds RISC-V
support, which will be used for the RISC-V nommu series I am
about to post.