Joint Global and Local Hierarchical Priors for Learned Image Compression