Limit formatting routes when adding resources

By default, routes.mapper.Mapper.resource adds a bunch of formatted
routes that accept anything after a '.'. Our spec says only .xml
and .json are accepted so limit the formatting to those valuse.

This allows identifiers with a '.' in urls. A few tests were added
to the extensions test to prove that .xml and .json are stripped
but other values are not.

Fixes bug 1027788

Change-Id: Ic888aa5d75050d6b14763c2a787ac8c8d5ab1f69
(cherry picked from commit 8935c3bde9e9635f65522488c1aca5df5b03050d)
Merge "Limit formatting routes when adding resources" into stable/folsom