The video and image sharing site apologises after a test was accidentally rolled out to millions of users.