Move ownership of IR::Stmt nodes from the basicblock to the function.

This will be useful as soon as start to move IR::Stmt nodes
around.