Hide the edit links unless they belong to a collapsible section

Follow up to 09df8277972028c9ea52f23fd2ba966ec54f2640.
When a page has h2s and h3s edit icons were showing in the top right
corner. This was an oversight. This corrects this.

Change-Id: If49b6b401067142c87e96574741d430b96f49fe8