Separate the library and test/example code

This way it is easier to build readily usable jar file for inclusion in 3rd party software.

Also change the minimum SDK target to API level 4 as there is nothing preventing
from using in older devices/SDKs. Also this way it is compatible with API level 4 Android support package.