shell: history feature optimization
shell: history feature optimization

When history feature is not compiled in it makes no sense to
trim the command. In addition when history feature is not active the
shell will not call function history_put.

Signed-off-by: Jakub Rzeszutko <db01fea5b4491dba4fc272e7096cf665c7b907b9@nordicsemi.no>

zephyrproject-rtos/zephyr,finikorg/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,galak/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,Vudentz/zephyr