Fix undefined index notice in "My Account" register

We have the following error when the options `Enable registration on the "Checkout" page` and `Automatically generate username from customer email` are activated:

```
Notice: Undefined index: username in path/to/includes/class-wc-form-handler.php on line 810
```
Fix this by checking if the option is enabled or not.
Also fix some coding standards.