Turkish President Recep Tayyip Erdogan has declared a three-month state of emergency, vowing to hunt down the "terrorist" group behind last week's bloody coup attempt.