Make max_, min_ and sum_ less general.
Proper NULL handling in max_, min_ and sum_.

- return expr (Value (Maybe a))
- add joinV to join nested Maybes in an expr
Handle NULL result in avg_ too.
Merge pull request #22 from db81/less_general_max

Less general aggregate functions and NULL handling.