Make codecheck read files as utf-8.
Added a codecheck rule that checks for missing include of memory if unique_ptr is used. Fixed style errors.
More style fixes.