make block.get_parent() work.

Implemented by @jimabramson, this is just a cherry-pick
We need this in our feature branch to make building course structure faster

reviewed and merged in https://github.com/edx/edx-platform/pull/6175

cc @dmitchell @cahrens @cpennington @andy-armstrong