Fix to treat formImportedFieldName as optional

The documentation says formImportedFieldName is optional in `formEvents.xml`. The code was not treating it as optional. This patch adds the unit test `test_form_imported_is_really_optional` which demonstrates the existing issue, and also a fix for it. Thanks to @psyclone241 for finding the original issue.

Also, if the code cleanup in the first commit is offensive, I can go back and remove it, but I think our mixing tabs with white spaces is bad practice so I let PyCharm clean it up.