At least 18 people have been martyred and over two dozen severely injured in a bomb attack on a Shia mosque and religious seminary in Pakistan's northwestern city of Peshawar.