Improve is_valid_attribute_name utility function

- don't allow python keywords;
- use ascii symbols only, no national letters or digits;
- code cleanup.

Change-Id: Ibf863edb6fd06257df05ca3c490f87f1c097144f