The Boston Marathon delivered a more than $500 million economic windfall to the Massachusetts economy this year.