ProjectExplorer: Use more algorithms

Make heavy use of lambdas

Change-Id: I53197d0ffb4ae8eec076f15335cc22b74e1def1d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>