Improve refs matcher in gnoref

Refs must be first on its own line and nothing may come after it. The
issue number must have 4 or 5 digits.