Spain's attorney general resigns after Supreme Court conviction over data leak