A teenage hacker has pleaded guilty to taking the Church of Scientology's website offline in 2008.