Changes to WADL parser.

I tried to come up with some logic that should make it possible to parse
a large variety of WADL files with slight deviations.