changed malloc and env locking to to stopping the scheduler, this to avoid deadlocks.\nAdd config support for the LwIP memory pool and some connection settings