Don't let crawlers go to edit page

Use javascript to hyperlink issue edit button to avoid crawlers following
such links reducing load on server.

Move access check and rendering logic for edit issue button to print_api.

Fixes #17960