replace bottle with wsgiref

better suited for serving only one request
avoid using a thread
make a simpler workflow

add a callback param to send the results back to the calling app