Efficient poling and thermal crosslinking of randomly bonded main-chain polymers for stable second-order nonlinearities