clean=various ifdef reduction

Signed-off-by: Andy Green <andy.green@linaro.org>
close should flush any truncated send before really closing

Signed-off-by: Andy Green <andy.green@linaro.org>
fixup no extentsion around last clean

Signed-off-by: Andy Green <andy.green@linaro.org>
fixes for close flush

Signed-off-by: Andy Green <andy.green@linaro.org>