Fix Net error behavior
Fix Net error behavior

A lot of Net functions returned Promises that would not reliably
resolve/reject if a Net request failed. This fixes it so they should
now all reliably reject on request failure.

(Yes, this fixes the ladder issues and memory leak in Main.)

xfix/Pokemon-Showdown,Enigami/Pokemon-Showdown,Zarel/Pokemon-Showdown,svivian/Pokemon-Showdown,xfix/Pokemon-Showdown,Zarel/Pokemon-Showdown,AustinXII/Pokemon-Showdown,xfix/Pokemon-Showdown,AustinXII/Pokemon-Showdown,Enigami/Pokemon-Showdown,svivian/Pokemon-Showdown,Enigami/Pokemon-Showdown,sirDonovan/Pokemon-Showdown,urkerab/Pokemon-Showdown,xfix/Pokemon-Showdown,urkerab/Pokemon-Showdown,sirDonovan/Pokemon-Showdown,Zarel/Pokemon-Showdown,AustinXII/Pokemon-Showdown,Enigami/Pokemon-Showdown,urkerab/Pokemon-Showdown,xfix/Pokemon-Showdown,svivian/Pokemon-Showdown,svivian/Pokemon-Showdown,sirDonovan/Pokemon-Showdown,svivian/Pokemon-Showdown