This octagonal mosque is Quba’s most distinctive historic building, painted a dull red and topped with a metallic dome forming a central point like a Prussian helmet.