Restructure the leo() prototype again.

This commit passes data by reference to both in() and out(). This change
was made because it's consistent between callbacks, and because many
libraries use this convention.

Additionally, in() now returns an int value to decide whether processing
should continue.