Check in_use flag

We enumerated synapses in each neurons by using synapse_counts. But
synapses in the arrays are sparse, so we modified to enumerate all
synapses and check in_use flag of each synapse.