Move current issue board serialization to core (CE-backport)
Migrates the serialization parts of BoardsHelper
to CE / core.
part of https://gitlab.com/gitlab-org/gitlab-ce/issues/53811
CE-backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14609