Extract common functionality to xblock-utils

@e-kolpakov Done.