fix #32 and #40: all inset computations wrongly included padding

This bug was due to a previous change, where padding was included in all inset calculations.

This fix makes the inclusion of padding selective.
fix #20: correct computation of auto margin

the computation of auto margins is now deferred, so that the actual width can be used in the computation.
cleanup: removed redundant code and wrong comment
minor, corrected an issue reference
Merge pull request #42 from hrj/i20_i32_i40

fixes: #20 #32 #40