misc.py: make 'calc_hashes()' generic
The 'calc_hashes()' function is generic so it does not make much sense
to hide it in the 'RawImageCreator' class. Move it to 'misc.py' where
miscellaneous stuff like this is kept.
While moving, also rename the 'file_name' argument to 'file_path'.
Also change the interface so that we pass a list of hash names to calculate,
not a list of hash objects.
Also do not import 'md5' from hashlib to the current name-spaces.
Note, originally I have these things as a set of separate patches, but
merged to satisfy review comments.
Change-Id: I31d8ac35cf55447ddb5c56cfafa319a6fef85373
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>