repository: introduce constant for sparse repo requirement and use it
In future we will like to much cleaner logic around which requirement is for
working copy and which can go in store. To start with that, we first need to
de-clutter the requirement values spread around and replace them with constants.
Differential Revision: https://phab.mercurial-scm.org/D8911
localrepo: refactor `.hg/requires` reading logic in separate function
In an upcoming patch, we will be reusing this to read `.hg/store/requires`, so
let's separate it in a different function before.
Differential Revision: https://phab.mercurial-scm.org/D8910