Fix nil-at-runtime issue with header layout attributes.

Safely put attributes-dependent logic inside an
if-let. Verified that occasional crashing seems to
have subsided.
Refine Swift usage of if-let's for Months screen data source.

Try various approaches to cut down on nested if-let's.