Hibernian held off a valiant challenge from Stranraer before booking their place in the fourth round of the Scottish League Cup with an entertaining 5-3 victory.