add function getForwardedValue, refactor foreach

- add opposite function of forward
- use new getForwardedValue in ForEach
cleanup functor which has used RefWrapper

 delete all explicit RefWrapper in functor signatures
change usage ref,byRef to forward
change year, add pragma once
change comments

- thanks to @f-schmitt-zih
Merge pull request #427 from psychocoderHPC/topic-refactorForEach

 refactor forEach