Improve list/array handling in SwaggerApiService

Recent addition of support for Array types needed a `ParseModel` call added to ensure that a Swagger model is generated for the array element type. I cleaned up some of the list/array handling code while I made the change, and reduced some duplication of logic.

Added unit tests for list/array handling, both for request and response models.