Only show 'Show extended details' for file metadata having extra rows

When a file only has default visible metadata, there is no need
to allow extending the optional metadata, because there are none.

Also added comments in ImagePage.php and shared.css because this
system is scattered all over and each piece seems disconnected
(the shared.css block was incorrectly documented as only being
used to initially hide rows, wheareas in practice that never
happens and instead the collapsed state is toggled on click).

Change-Id: I595fed425135c1e8dd341258633217428bcb4154