Did only servants in Sha'ar ha'Melech bow to Haman?
Vilna Gaon: No. "Kol Avdei ha'Melech" are those who serve him; "Asher b'Sha'ar ha'Melech" are those who sit in Sha'ar ha'Melech.
Malbim: Even those in Sha'ar ha'Melech bowed. Royal etiquette dictates that in the king's place, we do not honor anyone else. This belittles the king's honor, like it says that Uriyah ha'Chiti was Mored b'Malchus for saying "vA'doni Yo'av" (Shmuel II, 11:11) in front of David 1 . Achashverosh pardoned his honor, and commanded that people bow to Haman even in Sha'ar ha'Melech.
Kidushin 43a, according to Rashi. Tosfos disagrees. (PF)
Did the king command Haman?
Vilna Gaon: No. The king told him that he commanded others. This was extra dearness, like we say 'Yisrael are dear; an additional dearness - they were informed of this?' (Avos 3:14).
Malbim: He commanded also Haman, to punish one who will transgress it.
Why did Mordechai refuse to bow to him?
Rashi: Haman made himself a god (Sanhedrin 61b).
Malbim: (a) This would be like accepting him for a deity. Those who believed in superstitions, anyone who had an extra attribute of Chachmah, Gevurah or wealth, they said that he was from Bnei Elim, and a star or supreme power influences on him - "ul'Daniel Segid u'Minchah v'Amar l'Nasachah Le" (Daniel 2:46). Mordechai was a Yehudi (who denies idolatry). (b) The command was only for Avdei ha'Melech who sit in Sha'ar ha'Melech; Mordechai sat there, but he was not Eved ha'Melech. The laws of Paras say that a Yehudi cannot be an Eved [of the king] - "Ki Higid Lahem Asher Hu Yehudi" (4).