North Korea is able "thoroughly retaliate" against any hostile threat, Kim Jong-un has told a party congress while leaving the door open to talks with the US.