build: Refactor C++ dialect detection
build: Refactor C++ dialect detection

The previous version of this code had the following properties:

- All supported dialects are tested, though we only care about the
  "best" one by default. We can therefore eliminate unnecessary tests
  and reduce configuration time

- Error handling code provided a default dialect in the case of an
  exception, but such an exception would only be raised if the value of
  `args.cxx` was not valid. Therefore, we will allow any error (which
  would be unexpected) to propagate up

- If no dialects are supported, we use the "worst" (last) one and expect
  that the user will be well-informed of the error during compilation
  time

Signed-off-by: Jesse Haber-Kucharsky <526eadea4792054b99d5fa5dd6be9acdd76c5418@scylladb.com>
Message-Id: <85ac9fbac59e88c5ffacab4a91885b7f6a79033f.1542243355.git.526eadea4792054b99d5fa5dd6be9acdd76c5418@scylladb.com>

scylladb/seastar,avikivity/seastar,dreamsxin/seastar,cloudius-systems/seastar,cloudius-systems/seastar,syuu1228/seastar,syuu1228/seastar,scylladb/seastar,avikivity/seastar,avikivity/seastar,scylladb/seastar,dreamsxin/seastar,syuu1228/seastar,dreamsxin/seastar,cloudius-systems/seastar