Gloucestershire's decision to bat first backfires as Derbyshire assume the upper hand on the opening day in Bristol.