snippets: make snippet context creation lazy

Should save some memory, string allocations, and make startup faster.