UK lawmaker resigns after watching porn in parliament