Use milestone deadline when sorting issues (#14551)
Use milestone deadline when sorting issues (#14551)

When sorting issues by deadline, the deadline of the milestone the issue
is attached to wasn't taken into account.

It have been changed and the nearest deadline is taken into account for
sorting.

Co-authored-by: techknowlogick <274271a2414b6bd0d2eb0401dd4ff6e85d7016a7@gitea.io>
Co-authored-by: Lunny Xiao <0b0704cdf8f0790c6f1df1f74c38be95a8917ed2@gmail.com>
go-gitea/gitea,go-gitea/gitea,go-gitea/gitea