Modernize bison usage to work with bison3

Summary:
Feature: Build Improvements

Fix usage of bison, roughly similar to MDEV-4902.  This works
with old and new bisons.

https://mariadb.atlassian.net/browse/MDEV-4902

Test Plan: built on my devserver, built on debian unstable

Reviewers: pivanof, steaphan, darnaut

Reviewed By: pivanof

CC: steaphan, darnaut

Differential Revision: https://reviews.facebook.net/D17229