refactor permalink to support selection and redlining layers; add MapfishPermalink and QgisPermalink