Add buffer_map.rs; implement LayerBuffer recycling