parser: Correctly parse modules starting with declaration-and-docstring
Previously the module header parser would start by parsing a
maybedocheader
. This would consume the docstring and commit us to
parsing a module ... where
header. However, a module lacking a module ... where
header may also begin with a docstring, but one rather
belonging to a declaration. Restructure the parser to ensure that this
case is handled correctly.
Fixes #17561 (closed).