Man threatened MP Peter Kyle in gallows protest, court told