[classlib] Fixed bind not working properly if a vararg parameter is nil

Furthermore it turned out that the select function is a lot faster than
the common implementation of table.size