Government borrowing rose to £17.4bn last month - the second highest October figure since monthly records began, official figures show.