tools/building.py: more descriptive on error

Print the command that failed to execute and try to tell the reason to
fall.
Merge pull request #285 from grissiom/better-tools

tools/building.py: more descriptive on error
fixed bug: close socket when ping() exit.
used parameter: size.
format code Astyle.
Merge pull request #286 from aozima/pulls

Pulls
device: only increase the ref_count when device is truly opened
shell: print the ref count in `list_device`
Merge pull request #287 from grissiom/device-fix

Device fix
[LwIP] Fix the MEMP_NUM_TCP_SEG issue.
[lwIP] code cleanup
[libc] code cleanup.
[Finsh] Enhance mv command.
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
[DFS] Add dfs_filesystem_get_mounted_path() function.
Add WEAK definition; Add AUTO Refresh option for block device.
Add WEAK definition;
[lwIP] Add LWIP_NO_RX_THREAD/LWIP_NO_TX_THREAD options for lwIP.
[BSP] Fix compiling error
bsp: add zynq7000