Declare optional parameters according to HTML standard

According to
https://html.spec.whatwg.org/multipage/webappapis.html#timers timeout
and handles of setTimeout and friends are optional.