Updated CHtml to add maxlength support to all HTML5 fields

Fixes #3185. Fixes #2741.