Gruntfile api (Fix #432)

First draft on the Gruntfile API.

I'll cleanup the commit (and maybe some tests are failing...) I'm PRing right now to cleanup and have a better view of what is missing.