Improve gallery sizing logic
- improve gallery height calculation logic without tracking its container width
- fix a potential bug that doesn't show gallery attachments if the gallery (or timeline) was hidden at the mounting point
- set ideal flexible length on the gallery attachments based on their original aspect ratio (the original issue - !863 (comment 35649), you will see the ideal firefox version in all major browsers now)
Edited by Tae Hoon