Optimize/add missing use clauses in Client after DM 2.0 switch

Plus a little bit of (hopefully non-critical) clean up with the
help of PHPStorm's static code analysis.

Change-Id: Id0639ce23198a6a4e949069b0ffc6f8687228c4d
Optimize/add missing use clauses in Lib after DM 2.0 switch

Plus a little bit of (hopefully non-critical) clean up with the
help of PHPStorm's static code analysis.

Change-Id: If6f00fb6da5f2bcb04e647389c1fbf18c080e0bd
Merge "Optimize/add missing use clauses in Lib after DM 2.0 switch"
Merge "Optimize/add missing use clauses in Client after DM 2.0 switch"