Move ScopedSwap template out of pp-engine.cpp and into the utils lib.

Change-Id: I9370da5f3159f6d8ad9ee9f8fe949f66eb235592
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>