Change 'where' to 'template' in parser.

Goes after dev/class/interface keyword now. Not yet used.
Add TODOs for inconsistent clustering of functions.
Generated constraints now have fully qualified names.
Generated constraints are more concise.
Handle "self" for class methods.
If no pytd return type, treat as "-> [None]".
pytd test ignores whitespace in diff.