Move django <-> webob conversion functions to xblock core