Capacitance measurements as a new tool to investigate the electronic states of dislocations in semiconductors