Fix issues reported by sonar

Fix issues related to unused method variables, extract constants,
not nest more than 3 control stmts, use try with res in policy
engine project. Rework for comments

Issue-ID: POLICY-1008
Change-Id: If0953de9e802110df14862707f3b525652cdf112
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
9 files changed