Make upcase-region more intelligent

Signed-off-by: Bao Haojun <baohaojun@gmail.com>