Block binding: fix useless variable rename for some VAR scoped declarations

Closes #1323
Block Binding: hoist function declaration in block to beginning of block

Closes #1304
Block Binding: use orignal name where possible

Closes #1274