Allow trailing commas in maps

This PR allows trailing commas in maps. Fixes #495.