Generate unique swagger methods per Rails route for APIs

When auto-generating the JSON that is used to describe our API for
swagger, our code previously did not take into account controller
methods that have multiple routes. For example, the Submissions API
can request either 'courses' or 'sections', each of which is part of
the URL (path).

This patch adds a way to differentiate the submissions API methods.
Since these are the only methods that need it, the solution takes a
shortcut to uniqueness by using the 'courses' or 'sections' route
segment, known in advance to be the 3rd segment.

In future, we could make this more intelligent by using an algorithm
to find the shortest segments that make the method name unique.

Test Plan:
- the JSON output (e.g. public/doc/api/submissions.json) should have
  unique nicknames for the section or course variant of an API. e.g.
  the "List assignment submissions" API should have both a
  "list_assignment_submissions_courses" nickname and a
  "list_assignment_submissions_sections" nickname.

Fixes SIS-115

Change-Id: I7f3d093e4e3cc99f5f7cb93310756421708dc6f3
Reviewed-on: https://gerrit.instructure.com/28080
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Adams <eadams@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>