Enable benchmark building by default and fix benchmarks for gcc 6+
Summary: As per title. this is backport of upstream PR480 and PR490 by Pieter Wuille.
Test Plan:
make check
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1250