Problem/Motivation In Flag 7.x-3.x, flag links would appear in the entity links section even if all options under "Display in entity links" were unchecked. In 4.x, flag links do not appear at all.
Proposed resolution Alter the FlagEditForm to provide an explicit "display in node links option".
Implement hook_node_links_alter().
Add tests for display mode functionality.
Remaining tasks Create patch.
User interface changes An explicit "display in node links section" would appear in the FlagEditForm.
API changes Additional options would be available under the NodeFlagType.
Data model changes Additional options would be available for the NodeFlagType plugin.