New locators for content libraries

This PR implements two new types of locators necessary to facilitate content libraries. I'll be posting a separate PR to edx-platform for the content libraries prototype soon, but for now I'd like to start the review process for this locator code.

The new locators are described in detail under the "New Locators" heading at https://openedx.atlassian.net/wiki/display/SOL/Content+Libraries

I feel like we're getting past the point where a regex for parsing makes this easier to read. I almost implemented imperative to parse the same, but held off. Still, seems like it might be worth considering a different parsing solution (combinators, maybe?)