various fixes

Main feature is android lib debugging, although sometimes gdb reloads shared object lists and android lib symbols disappear (changing shared object list permanently is a bad idea because ld-linux has lots of non-trivial private data there and will crash / assert out when it's missing).