Minor cleanups from pimd and whitespace fixes.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Update ChangeLog and bump version for v3.9.7 release.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>