This patch addresses a couple of issues with the Edit Environment dialogue.
- If the user removed all lines, we just save an empty list (previously the changes wouldn't be saved at all)
- If the user opens the edit env dialog, changes something, clicks OK, then reopens it before clicking OK/Apply in the edit profile dialogue (the parent dialogue) we show the new env vars.