refactor item::is_funnel_container

Use `unsigned int` as parameter, because it is compared against `it_container::contains` which is an `unsigned int`, too.
Return `boolean` and move the comparison in the function directly instead of after calling. At the same time update the `maxcontains` value, which currently is never written.

And of course check for watertight container to fix #6411

Btw. this looks only at the container size, not at the free volume that can be used to fill it. It will only fill the largest container it finds and ignore any other containers.