esp32/modnetwork: Add "reconnects" option to WLAN STA interface.
esp32/modnetwork: Add "reconnects" option to WLAN STA interface.

This adds a wlan.config(reconnects=N) option to set the number of reconnect
attempts that will be made if the WLAN connection goes down.  The default
is N=-1 (infinite retries, current behavior).  Setting
wlan.config(reconnects=0) will disable the reconnect attempts.

A nice side effect of reconnects=0 is that wlan.status() will report the
disconnect reason now.  See related issue #5326.

adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,bvernoux/micropython,bvernoux/micropython,adafruit/circuitpython,bvernoux/micropython,adafruit/circuitpython,bvernoux/micropython,adafruit/circuitpython,bvernoux/micropython