Use the gcc warn_unused_result attribute to warn of unused function return values.
https://github.com/wiredtiger/wiredtiger/pull/2938
https://github.com/wiredtiger/wiredtiger/pull/2939