refactor: simplify using mimalloc (#1454)
* simplify using mimalloc
* fix the duplication issue of mimalloc.o since the linker deduplicates archives automatically, but it's slightly suboptimal. better would be to prevent cgo from duplicating it in the first place.
* only set stack size for musl
* Update build-static.sh