cal: add month contents structure

This commit changes determination of calendar month content completely,
as well as outputing.  The output is done week by week, which will allow
laying out months horizontally more understandable way.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
cal: make cal --three to use content structures

Signed-off-by: Sami Kerola <kerolasa@iki.fi>