Fix various problems with ModuleManager.

- Fix downloading the module list on very new versions of Perl.
- Fix an off by one error caused by array sizing starting at -1
  instead of 0 like in every single other language (!!).
- Fix vague error messages when LWP encounters an error.
- Fix LWP::Simple being used before we have checked whether it is
  available.