Enable the use of 'optional' on password fields

The logic has been changed, in that 'class="optional"' is applied to both
password and text types if the field begins with the optional market, '&'.
Correct field modifier checking

Existing code checks for the existence of a modifier ('&', '!', '#', '*')
anywhere in the field name, but strips the first character regardless. This
change makes it so that only modifiers at the beginning of the string are
counted.