Update H501 to check for self.__dict__

There was a bug in Cinder where log formatting
of a translated i18n message with self.__dict__
caused the cinder API service to hang on py26.

Update the hacking rule for locals() in formatting
operations to also check for usage of self.__dict__.

Change-Id: Ie358c4140471b776fecb3430e0131e5b80382689
Closes-Bug: #1366031
Related-Bug: #1365901