Relax the parsing of square brackets in atoms

Unlike a regular atom, an astring may be an atom that contains the ']'
character. A response such as "* STATUS [blurdybloop] (...)" is valid,
because mailbox is an astring. This fix allows all atoms to contain '['
and ']' characters as long as the usage is unambiguous.

Thanks to Simone Gotti for reporting this and providing the initial fix.