Rewrite parseAnnotation using regexp.
Rewrite parseAnnotation using regexp.

This causes the tests in TestParseAnnotation to pass.

The documentation at https://collector.torproject.org/#data-formats does
not say exactly what the syntax of type annotations is; it says only
	@type $descriptortype $major.$minor
and doesn't say, for example, what bytes are allowed in $descriptortype.
I've used the same pattern Stem uses, which is
	^@type (\S+) (\d+)\.(\d+)$
	https://gitweb.torproject.org/stem.git/tree/stem/descriptor/__init__.py?id=1.4.1#n182
\S means non-whitespace and \d means digits. I don't think there's a
difference between Python and Go (e.g. wrt Unicode) for these
metacharacters.

I also looked at metrics-lib but it does not actually parse annotations;
it just remembers the full lines and does things like
	if (firstLines.startsWith("@type network-status-consensus-3 1."))
	https://gitweb.torproject.org/metrics-lib.git/tree/src/main/java/org/torproject/descriptor/impl/DescriptorImpl.java?id=descriptor-1.3.0#n32

Signed-off-by: Philipp Winter <5a4b10454c30419e54a1570be358a516ff84bb63@nymity.ch>

NullHypothesis/zoossh