build: create a 'buildutils' module exposed to all SConscripts. Centralise fixFlags() as this was starting to get duplicated in a lot of places.