[2.4][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty

#9333 merged into master.