[NFC] Refactor update_lit_checks.py (#3964)
[NFC] Refactor update_lit_checks.py (#3964)

Decompose the code into more functions and make other simplifying changes to
prepare for multi-module support introduced in #3962.
WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen