Extract test parsers

Extract methods used by unit-tests to parse the generated services
script, so that they can be used by grunt-loopback-angular too.

/to: @ritch please review