Fix attribute assigment test with crlf newlines
Extract common builder methods to abstract classes

Declaration for fns/classes in general and FunctionLike for
functions/methods in particular.
Add trait builder (for completeness...)