cmake: use -H -B trick for out-of-src build
cmake: use -H -B trick for out-of-src build

As initially discussed in #1379. This removes the need to use `mkdir` and `cd`. Inspired by this post:
https://www.reddit.com/r/programming/comments/6b9r19/how_to_build_a_cmakebased_project/dhlfh05/
zoisom/tldr,katekyan/tldr,cptdeka10/tldr,UncommonPleb/tldr,deekim/tldr,slash3b/tldr,katekyan/tldr,cptdeka10/tldr,felixonmars/tldr,zoisom/tldr,felixonmars/tldr,cptdeka10/tldr,slash3b/tldr,katekyan/tldr,UncommonPleb/tldr,Phizho/tldr,deekim/tldr,Phizho/tldr,deekim/tldr,zoisom/tldr,UncommonPleb/tldr,slash3b/tldr,felixonmars/tldr,Phizho/tldr