From 42 for 5 in pursuit of 143, Ben Cox's 47 proved too much for a spirited Gloucestershire attack