A miniature capacitance dilatometer for magnetostriction and thermal expansion measurements