Converts var declarations to const declarations. const declarations are block-scoped and behave more strictly.

Declarations might be moved to the top of the function or before the first usage of the variable.