CRAB: A CMS application for distributed analysis