restored mongo's splitvector dbname handling #1181

originally broken by #579

fixes #1181
reorder includes to avoid shadowing min/max
set cmake_policy for cmake 3.0