Allow to order epics by start or end date

This implements sorting used on epics roadmap page as described
here:
https://gitlab.com/gitlab-org/gitlab-ee/issues/3559#sorting-logic-of-epics

It sorts epics by start_date, if an epic does not have start_date set,
it uses end_date in sorting.

Related #3559
91 jobs for ee-epics-sorting in 36 minutes and 37 seconds (queued for 7 seconds)
Status Job ID Name Coverage
  Build
manual #50326195
gitlab-org allowed to fail manual
package-qa
manual #50326196
gitlab-org allowed to fail manual
review-docs-deploy
 
  Prepare
passed #50326198
gitlab-org
compile-assets

00:06:28

passed #50326197
gitlab-org
retrieve-tests-metadata

00:00:23

passed #50326199
gitlab-org
setup-test-env

00:04:00

 
  Test
passed #50326284
codequality

00:17:06

passed #50326275
gitlab-org
db:check-schema-pg

00:02:40

passed #50326274
gitlab-org
db:migrate:reset-mysql

00:03:23

passed #50326273
gitlab-org
db:migrate:reset-pg

00:03:07

passed #50326279
gitlab-org
db:rollback-mysql

00:03:12

passed #50326278
gitlab-org
db:rollback-pg

00:03:35

passed #50326271
gitlab-org
docs lint

00:00:31

passed #50326272
gitlab-org
downtime_check

00:01:03

passed #50326282
gitlab-org
gitlab:assets:compile

00:07:21

passed #50326281
gitlab-org
gitlab:setup-mysql

00:05:34

passed #50326280
gitlab-org
gitlab:setup-pg

00:09:57

passed #50326288
gitlab-org
gitlab_git_test

00:00:55

failed #50582507
gitlab-org
karma

00:08:14

53.98%
passed #50326277
gitlab-org
migration:path-mysql

00:12:34

passed #50326276
gitlab-org
migration:path-pg

00:12:59

passed #50326286
gitlab-org
qa:internal

00:09:30

passed #50326287
gitlab-org
qa:selectors

00:09:30

passed #50326230
gitlab-org
rspec-mysql 0 27

00:13:45

passed #50326231
gitlab-org
rspec-mysql 1 27

00:16:03

passed #50326240
gitlab-org
rspec-mysql 10 27

00:16:25

passed #50326241
gitlab-org
rspec-mysql 11 27

00:16:21

passed #50326242
gitlab-org
rspec-mysql 12 27

00:16:59

passed #50326243
gitlab-org
rspec-mysql 13 27

00:17:51

passed #50326244
gitlab-org
rspec-mysql 14 27

00:15:41

passed #50326245
gitlab-org
rspec-mysql 15 27

00:17:29

passed #50326246
gitlab-org
rspec-mysql 16 27

00:12:00

passed #50326247
gitlab-org
rspec-mysql 17 27

00:10:22

passed #50326248
gitlab-org
rspec-mysql 18 27

00:15:32

passed #50326251
gitlab-org
rspec-mysql 19 27

00:11:30

passed #50326232
gitlab-org
rspec-mysql 2 27

00:11:18

passed #50326253
gitlab-org
rspec-mysql 20 27

00:19:29

passed #50326255
gitlab-org
rspec-mysql 21 27

00:21:23

passed #50326258
gitlab-org
rspec-mysql 22 27

00:17:54

passed #50326259
gitlab-org
rspec-mysql 23 27

00:16:55

passed #50326261
gitlab-org
rspec-mysql 24 27

00:15:47

passed #50326262
gitlab-org
rspec-mysql 25 27

00:13:59

passed #50326263
gitlab-org
rspec-mysql 26 27

00:18:05

passed #50326233
gitlab-org
rspec-mysql 3 27

00:15:23

passed #50326234
gitlab-org
rspec-mysql 4 27

00:11:37

passed #50326235
gitlab-org
rspec-mysql 5 27

00:17:00

passed #50326236
gitlab-org
rspec-mysql 6 27

00:16:46

passed #50326237
gitlab-org
rspec-mysql 7 27

00:13:16

passed #50326238
gitlab-org
rspec-mysql 8 27

00:16:12

passed #50326239
gitlab-org
rspec-mysql 9 27

00:16:18

passed #50326201
gitlab-org
rspec-pg 0 27

00:11:35

passed #50326202
gitlab-org
rspec-pg 1 27

00:16:20

passed #50326212
gitlab-org
rspec-pg 10 27

00:13:28

passed #50326214
gitlab-org
rspec-pg 11 27

00:21:40

passed #50326215
gitlab-org
rspec-pg 12 27

00:16:23

passed #50326216
gitlab-org
rspec-pg 13 27

00:15:57

passed #50326217
gitlab-org
rspec-pg 14 27

00:19:36

passed #50326218
gitlab-org
rspec-pg 15 27

00:18:11

passed #50326219
gitlab-org
rspec-pg 16 27

00:19:22

passed #50326220
gitlab-org
rspec-pg 17 27

00:16:10

passed #50326221
gitlab-org
rspec-pg 18 27

00:19:20

passed #50326222
gitlab-org
rspec-pg 19 27

00:17:29

passed #50326203
gitlab-org
rspec-pg 2 27

00:13:16

passed #50326223
gitlab-org
rspec-pg 20 27

00:16:31

passed #50326224
gitlab-org
rspec-pg 21 27

00:15:02

passed #50326225
gitlab-org
rspec-pg 22 27

00:18:21

passed #50326226
gitlab-org
rspec-pg 23 27

00:21:35

passed #50326227
gitlab-org
rspec-pg 24 27

00:16:44

passed #50326228
gitlab-org
rspec-pg 25 27

00:20:42

passed #50326229
gitlab-org
rspec-pg 26 27

00:19:50

passed #50326204
gitlab-org
rspec-pg 3 27

00:16:56

passed #50326205
gitlab-org
rspec-pg 4 27

00:18:09

passed #50326206
gitlab-org
rspec-pg 5 27

00:12:58

passed #50326208
gitlab-org
rspec-pg 6 27

00:12:02

passed #50326209
gitlab-org
rspec-pg 7 27

00:18:42

passed #50326210
gitlab-org
rspec-pg 8 27

00:18:23

passed #50326211
gitlab-org
rspec-pg 9 27

00:18:15

passed #50326200
gitlab-org
rspec-pg geo

00:09:47

passed #50326285
sast

00:05:06

passed #50326267
gitlab-org
spinach-mysql 0 3

00:10:41

passed #50326268
gitlab-org
spinach-mysql 1 3

00:12:08

passed #50326269
gitlab-org
spinach-mysql 2 3

00:09:38

passed #50326264
gitlab-org
spinach-pg 0 3

00:10:01

passed #50326265
gitlab-org
spinach-pg 1 3

00:11:11

passed #50326266
gitlab-org
spinach-pg 2 3

00:12:38

passed #50326270
gitlab-org
static-analysis

00:07:07

failed #50326283
gitlab-org
karma

00:11:53

53.98%
failed #50328906
gitlab-org
karma

00:07:56

53.98%
 
  Post Test
skipped #50326290
gitlab-org
coverage
skipped #50326289
gitlab-org allowed to fail
flaky-examples-check
skipped #50326291
gitlab-org
lint:javascript:report
 
  Post Cleanup
skipped #50326292
gitlab-org allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
karma Test
================================================================================
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
rake karma:tests failed
Uploading artifacts...
chrome_debug.log: found 1 matching files
coverage-javascript/: found 1662 matching files

Uploading artifacts to coordinator... ok
id=50582507 responseStatus=201 Created token=tcmMztAj
ERROR: Job failed: exit code 1