Move ceilinged code generator to separate function.

It is easier to extend it to signed ceiling when it is
separated from truncate.
Change some test cases to work correctly on non-32-bit machines.
Implement signed ceilinged division.

TODO: Better remainder calculation,
handling N+1 bit multipliers.
Better remainder calculation for signed ceiling.

Use the same method as in unsigned ceiling, but only if the result
is positive (an intermediary value can overflow when the result is
negative).
Add comments and examples for the ceiling transform.

Also fix some existing comments.