Moved the role of SlaveProtocol to Slave.

At first, I aimed to devide auto-generated part and manually-coding
part in slave for Java. But finally, Slave.java must be auto-generated.
So I unified Slave and SlaveProtocol with this patch.
Fixed to escape ConcurrentModificationException.