Support :size option for select inputs

This also makes sure the multiple attribute it used if the :multiple
option is given, even if there are no options, which can be useful
if the options are added dynamically.