refactored Pattern::Pattern(istream*), no longer uses mainpatternbuffer and is not restricted by its length