libbb: fix bb_ask() to flush input before prompt, not after. Closes 7190

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
test: fix mishandling of "test '(' = '('" and similar

function                                             old     new   delta
test_main                                            246     350    +104

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>