Added CMake helper scripts to find popt and ares + other small fixes.

git-svn-id: https://svn.resiprocate.org/rep/resiprocate/branches/b-cmake-experiment@10881 ddefafc4-47db-0310-ae44-fa13212b10f2