Avoid separate allocations for globScanner instances.
Avoid repeating self.
Fix doc comment for NewPattern.
Add error variables.

No need to call errors.New each time.