[TIMOB-10837] use return with the last statement for blocks

If passed in value is not an expression but a statement block, extract the last statement and add prepend 'return'.

https://jira.appcelerator.org/browse/TIMOB-10837