A helicopter has attacked Venezuela's Supreme Court in Caracas, President Nicolas Maduro said, in what he termed an "armed terrorist attack."