Rewrite get_definitions using evaluate.get_names_of_scope

- Definition.names is changed to Definition.name.
- TestGetDefinitions.test_nested_definitions fails.
Add get_names_of_scope option to evaluate.get_names_of_scope

Previously failing test passes now.
Document return type of get_names_of_scope
Fix Python 3 syntax error
Add TestGetDefinitions.test_dotted_assignment