Parse atoms using a scanner class

The capability reply is defined in RFC 3501 as a sequence of atoms.
We're simply splitting the string on space which is not enough.

Implement a scanner class that can scan a string for atoms, and use that
when parsing the capability reply. The idea is that the scanner class
will over time be amended to scan for other things as they are needed.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>