A Swindon man has pleaded guilty to trying to intimidate a witness into withdrawing a serious allegation 20 minutes after being released from custody.