Turkey has blocked online encyclopaedia Wikipedia, citing a law allowing it to ban access to websites deemed obscene or a threat to national security.