Fix search by slug and add admin script
@alossent remarked that it was not possible to get information about a short URL based on the slug, even though this was documented in the API.
This patch fixes that behavior and introduces an additional test case. It also adds an admin script to easily retrieve metadata about a slug.