lib: Clean up various file access syntax

Python 3 is stricter about how files are accessed. Specficially:

 * Use open(), not file()
 * Use binary mode for binary files (when checksumming)
 * Use with statements to ensure files get closed
 * Add missing file close statements

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: Remove deprecated operator

The <> operator is deprecated, replace with !=.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
providers: Remove pointless lambda sort function

This lambda function is equivalent to the default sort used by sorted,
so we can simply remove this. The syntax isn't compatible with python 3.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
siggen: Add missing error message parameter

There is clearly a missing parameter from this error message, add it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
prserv: Drop StandardError usage

StandardError doesn't exist in python 3, use Exception instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib: Use modern expcetion syntax

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib: print is a function in moderm python, covert remaining users

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>