Bulgarian police have detained a man after he attempted to assassinate a prominent politician during a live televised speech.